/**
 * Tencent is pleased to support the open source community by making Tars available.
 *
 * Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.
 *
 * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 
 * in compliance with the License. You may obtain a copy of the License at
 *
 * https://opensource.org/licenses/BSD-3-Clause
 *
 * Unless required by applicable law or agreed to in writing, software distributed 
 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the 
 * specific language governing permissions and limitations under the License.
 */

// **********************************************************************
// This file was generated by a TARS parser!
// TARS version 2.1.4.1 by WSRD Tencent.
// Generated from `Test.tars'
// **********************************************************************

using System;
namespace Test
{

    public sealed class A : Tup.Tars.TarsStruct
    {
        int _a = 0;
        public int a
        {
            get
            {
                 return _a;
            }
            set
            {
                _a = value; 
            }
        }

        public B b {get; set;} 

        public override void WriteTo(Tup.Tars.TarsOutputStream _os)
        {
            _os.Write(a, 1);
            _os.Write(b, 2);
        }

        public override void ReadFrom(Tup.Tars.TarsInputStream _is)
        {
            a = (int) _is.Read(a, 1, true);

            b = (B) _is.Read(b, 2, true);

        }

        public override void Display(System.Text.StringBuilder _os, int _level)
        {
            Tup.Tars.TarsDisplayer _ds = new Tup.Tars.TarsDisplayer(_os, _level);
            _ds.Display(a, "a");
            _ds.Display(b, "b");
        }

    }
}

